/*
 * @(#)Constant.java	2008/07/28
 *
 * Copyright 2008 Web & Zen Multimedia, All rights reserved.
 * Use is subject to license terms.
 */
package it.wzm.lightweightlog;

import java.text.SimpleDateFormat;

/**
 * This interface serve as a constant holder for application wide sharing
 * @author Leonardo Celati
 * @version 1.0
 */
public interface Constant {

    /** Enum representing all possible log level for the Dumper */
    enum Severity {
    	SERVICE,/** service log level */
        DEBUG,	/** debug log level */
        INFO,	/** info log level  */
        WARN,	/** warn log level  */
        ERROR,	/** error log level */
        FATAL,	/** fatal log level */
    }
    /** The default file name in case a custom one is missing */
    public String PROP_DEFAULT = "it/wzm/lightweightlog/dump_default.properties";
    /** The name the custom file has to have */
    public String PROP_NAME="it/wzm/lightweightlog/dumper.properties";
    /** The root of all the others properties */
    public String PROP_ROOT = "dumper.";
    /** default implementation of Queue */
    public String DEFAULT_QUEUE = "it.wzm.lightweightlog.FastQueue";
    /** Default implementation of Register */
    public String DEFAULT_REGISTER = "it.wzm.lightweightlog.DefaultRegister";
    /** Default implementation of Queue dumper */
    public String DEFAULT_QUEUE_DUMPER = "it.wzm.lightweightlog.QueueDumper";
    /** default log wrapper */
    public String DEFAULT_ENTRY = "it.wzm.lightweightlog.Entry";
    /** default dump interval */
    public long DEFAULT_DUMP_INTERVAL = 5000;
    /** default size rotation */
    public long DEFAULT_SIZE = 10000;
    /** default prepared statement for DBDumper */
    public String DEFAULT_PREPARED_STMT = "INSERT INTO lightweight_dump (event, message, severity, classname, name) VALUES (?,?,?,?,?)";
    /** default behavior on failure */
    public boolean DEFAULT_KILL_ON_FAILURE = true;
    /** default keep alive */
    public boolean DEFAULT_KEEP_ALIVE = true;    
    /** default service log enabled */
    public boolean DEFAULT_SERVICELOG = true;
    /** default format of date in log */
    public SimpleDateFormat DEFAULT_LINE_DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    /** default encoding */
    public String DEFAULT_ENCODING = "UTF-8";
    
    public long DEFAULT_SYNCHRONIZED_QUEUE_WAKEUP = 10000;
}
